1. Field
The embodiments discussed herein are directed to a moving-picture coding device and a moving-picture decoding device having an inter-field prediction mode.
2. Description of the Related Art
In general, moving-picture data has a large amount of data. Thus, high efficiency coding is performed upon the moving-picture data is transferred to a receiving device from a transmitting device or is stored in a storage device. In this case, “high efficiency coding” is coding processing of converting a certain data string into another data string and is referred to as a method for compressing the amount of the data. ISO/IEC MPEG-2/MPEG-4 (hereinafter referred to as MPEG-2/MPEG-4) are given as a representative moving-picture coding method. FIG. 1 illustrates an overview of the moving-picture coding device. First, a motion vector determining unit 101 generates a motion vector 105 by using an input image 100 and a reference picture 104 which is a past decoding image. A prediction image generating unit 102 generates a prediction image 103 by using the motion vector 105 and the reference picture 104. A prediction error between the prediction image 103 and the input image 100 is generated in blocks by a subtracting unit 106. Then the prediction error generated in blocks is compressed by an orthogonal transform unit 107 and a quantization unit 108, and is transmitted with the motion vector 105 to an entropy coding unit 109 in which a bit stream is generated. Moreover, an output of the quantization unit 108 expands the prediction error by an inverse quantization unit 110 and an inverse orthogonal transform unit 111. The prediction image 103 and the image which is added and coded by an addition unit 112 are played and stored in a reference image storing unit 113 as the reference picture. A low-delay needs to be achieved in coding and decoding upon a real time communication is made by using such moving-picture coding method. Description is made below of a low-delay coding method of the MPEG-2. The MPEG-2 can define three kinds of pictures, I, P, and B. The I picture is a picture which is able to restore the image only by information inside the picture itself without using a coding image of other picture and the prediction. The P picture is a picture obtained by coding the prediction error generated by the inter-picture prediction performed from a past picture in a forward direction. The B picture is a picture obtained by coding the prediction difference generated by the inter-picture prediction performed in a past picture and a future picture in a bidirectional direction. Since the B picture uses the future picture for the prediction, the future picture used for the prediction needs to be coded prior to the coding. Therefore, the pictures are rearranged in order of the coding. In this case, a method for achieving the low-delay does not use the B picture in order to reduce the delay of rearranging the pictures. A processing unit for the moving-picture coding is a macro block, i.e., the picture is divided into a block of 16×16 pixels.
There are two kinds of macro blocks. One is an intra-macro block in which intra-picture coding is performed, and the other one is an inter-macro block in which inter-picture coding is performed. In this case, the method for achieving the low-delay uses an intra-slice for coding, as the intra-macro block, all the data in a macro block line (slice) in which a macro block is horizontally arranged. Description is made of the intra-slice by using FIG. 2. Each of pictures 210a-210c is coded by the P picture. In this case, the whole picture is circulated with the intra-slice at a certain interval by shifting little by little a position of the macro block line applying the intra-slice from an intra-slice 213a of a 0th macro block line to an intra-slice 213b of an Nth macro block line, and to intra-slice 213c of an N+1th macro block line. As a result, the refresh of all the pictures (219a, b) is possible after the circulation, and it becomes possible to return from an error occurred due to a transmission error and to decode a video stream in the middle thereof. Moreover, the size of a buffer can be smaller by not using the I picture, so that the delay caused by the buffer can be reduced. In this case, however, upon the macro block belonging to the slice other than the intra-slice of the P picture performs motion compensation by using the vector without limitation, if an error occurs in an unrefreshed area which is not coded by the intra-slice even though the whole picture is circulated with the intra-slice, the error is transmitted in a direction of a space. At worst, the error may remain in a display. Description is made of a problem of a conventional technique by using FIG. 3. An example of FIG. 3 illustrates a case of an unrefreshed area 320 of a reference picture 311 including an encoding error. In this case, in a coding picture 312, upon a motion vector 305 of a coding target block 317 indicates the unrefreshed area 320 including a decoding error of the reference picture 311. Upon a prediction image 316 is generated by using a pixel of this area, the image including the prediction image is used as the reference image following a next picture as illustrated in FIG. 1. Therefore, the decoding error is transmitted to an area 319b which has already been refreshed by the intra-slice. Description is made of this conventional technique by using FIG. 4. In order to solve this problem, a method describes not transmitting the error by providing a motion compensation inhibit line for only a predetermined period for the slice coded by the intra-slice and inhibiting the motion compensation using a nonzero motion vector. In the conventional technique, in a coding picture 412, a coding target block 417 belonging to the area coded as an intra-slice 413a in a reference picture 411 which is the coding picture preceding the coding picture 412 permits only a zero vector (0, 0) in the coding picture 412. As a result, it is guaranteed that a prediction image 416 of the coding target block 417 is comprised of only the pixel comprising the intra-slice of the reference picture 411, and does not use the pixel of an unrefreshed area 420. This makes it possible to reduce the transmission of a coding difference or the like of the unrefreshed area.
When the previous technique is applied to an international standard of moving-picture coding, there is a problem that it is impossible to prevent the transmission of the error in the direction of the space because of an inherent problem of the coding method if the encoding error occurs in the unrefreshed area. Description is made of the problem of a case of applying a conventional technique. As described above, vector limitation is performed with respect to the slice coded by the intra-slice in such a way that only a motion-zero vector is used only in the predetermined period. As a structure of coding the moving-picture comprised of the field.
In the new video coding standard ITU-T H.264(ISO/IEC MPEG-4 Part 10), a calculation method depending on the coding picture and the reference picture is employed in order to generate the motion vector of the chrominance component from the motion vector of the luminance component. A method for deriving the chrominance component in H.264/MPEG-4 AVC can depend on three cases. One is the case upon both a bottom field of the coding picture and the bottom field of the reference picture are the same parity. Another is the case when the coding picture is the top field and the reference picture is the bottom field. The other is the case when the coding picture is the bottom filed and the reference picture is the top field. The following is a equation (1) for generating the chrominance vector from the luminance vector in the case when the coding picture is the bottom field and the reference picture is the top field.MVCy=MVy/2+¼  (1)
Further, the following is a equation (2) for generating the chrominance vector from the luminance vector in the case when the coding picture is the top field and the reference picture is the bottom field.MVCy=MVy/2−¼  (2)
Still further, the following is a equation (3) for generating the chrominance vector from the luminance vector in the case when the coding picture and the reference picture are the same parity,MVCy=MVy/2  (3)
In this case, MVCy is a chrominance vector vertical direction component, and MVy is a luminance vector vertical direction component.
In the conventional coding such as the MPEG-2, ½ of the value of the luminance vector, that is, the value corresponding to the equation 3 is used for the chrominance vector in spite of the parity or the like.
Here, at the time of coding the field of a conventional method, when the coding picture is the bottom field and the reference picture is the top field, if the conventional technique such as described in the Patent Document 1 is used to prevent the transmission of the decoding error at the time of coding by the intra-slice, there is a problem that the error may be transmitted in the refresh area in the case upon the decoding error is included in the unrefreshed area. The reason is described as follows. A vector zero (0, 0) can be selected in a frame followed by the intra-slice. In this case, according to the equation 1, since the luminance vector vertical component MVy is 0, the chrominance vector vertical component MVCy is calculated by the following equation (3.5).MVCy=MVy/2+¼=(0/2)+¼=¼  (3.5)
That is, the chrominance vector is (0, ¼), a downward vector. As illustrated in FIG. 5, a prediction block area 516 of the luminance component can generate a prediction block by not using the pixel of the unrefreshed area 520 of the luminance. However, as for the chrominance, a prediction block area 518 of the chrominance straddles only ¼ pixel of an unrefreshed area 521. As a result, the prediction image of the chrominance refers to the area including the decoding error, so that the error may be transmitted by the chrominance component.